﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace HARTCalibrationTool.变送器选择
{
    public partial class IndicatorButton1 : UserControl
    {
        public IndicatorButton1()
        {
            InitializeComponent();
        }

        protected override void OnPaint(PaintEventArgs e)
        {
            base.OnPaint(e);

            // Draw the circular indicator light
            using (Graphics g = panel.CreateGraphics())
            {
                g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
                g.Clear(panel.BackColor);

                // Draw circle
                using (Brush brush = new SolidBrush(panel.BackColor))
                {
                    g.FillEllipse(brush, 0, 0, panel.Width, panel.Height);
                }
            }
        }
    }
}
